<%@ page import="mr.zhang.dao.domain.Merchant" %>
<%@ page import="mr.zhang.dao.domain.MerchantProperty" %>
<%@ page import="java.util.List" %>
<%@ page language="java"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>更新商家属性信息</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

</head>

<body>
	<%
		MerchantProperty merchantProperty = (MerchantProperty) request
				.getAttribute("merchantProperty");

		List<Merchant> list = (List<Merchant>) request.getAttribute("list");
	%>
	<center>
		<font color="red" size="10">录入商家属性信息</font> <br> <br> <br>
		<br>
		<form action="updateMerchantProperty.do" method="post">
			<table>
				<tr>
					<td><input type="hidden" name="id" value="<%=merchantProperty.getId() %>"></td>
				</tr>
				<tr>
					<td>商家属性名称:</td>
					<td><input type="text" name="property_name"
						value="<%=merchantProperty.getProperty_name()%>" /></td>
				</tr>
			</table>
			<label class="control-label col-lg-3">选择商家</label> <select
				name="merchant_id">
				<option value="<%=merchantProperty.getMerchant().getId()%>"><%=merchantProperty.getMerchant().getMerchant_name()%></option>
				<%
					for (int i = 0; i < list.size(); i++) {

						Merchant merchant = list.get(i);
				%>

				<option value="<%=merchant.getId()%>"><%=merchant.getMerchant_name()%></option>
				<%
					}
				%>
			</select> <br> <br> <input type="submit" value="提交" />


		</form>
	</center>
</body>
</html>
